//
//  CustomSaleCell.m
//  YouGoWeGo
//
//  Created by LiuFei on 14/11/19.
//  Copyright (c) 2014年 LiuFei. All rights reserved.
//

#import "CustomSaleCell.h"

@implementation CustomSaleCell
- (void)dealloc
{
    [_commentLabel release];
    [_userNameLabel release];
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.userNameLabel = [[UILabel alloc] initWithFrame:CGRectZero];
        
        [self.contentView addSubview:_userNameLabel];

        
        self.commentLabel = [[UILabel alloc] initWithFrame:CGRectZero];
        [self.contentView addSubview:_commentLabel];
        [_commentLabel release];
    
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    [_userNameLabel setFrame:CGRectMake(10, 10, self.frame.size.width - 20, 50)];
    [self.userNameLabel setNumberOfLines:0];
    [self.userNameLabel sizeToFit];
  
    
    [_commentLabel setFrame:CGRectMake(10, self.userNameLabel.frame.size.height + 20, self.frame.size.width - 20, 50)];
    [self.commentLabel setNumberOfLines:0];
    [self.commentLabel setFont:[UIFont systemFontOfSize:15]];
    [self.commentLabel sizeToFit];
    
    


}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
